<?php
class cmsEntity
{
	public static function GetRow($tid)
	{
		$row = $_ENV['db']->fetch("SELECT * FROM `article` WHERE `article_id` = '{$tid}'");
		return $row;
	}
	
	public static function GetList($keyword)
	{
		$rows = $_ENV['db']->fetchAll("SELECT * FROM `article` where title like '%{$keyword}%' order by sort ");
		return $rows;
	}
	
	public static function GetArticleClass()
	{
		$rows = $_ENV['db']->fetchAll("SELECT * FROM `article_class` ");
		return $rows;
	}
	
	public static function GetListByCid($cid)
	{
		return $_ENV['db']->fetchAll("SELECT * FROM `article` WHERE `cid`='{$cid}' order by sort desc" );
	}
	
	/*返回动态列表*/
	public static function GetdongtaiList()
	{
        return $_ENV['db']->fetchAll("SELECT * from `article` where `cid` ='14' ");
	}
	/*返回列表title*/
	public static function GetTitle($cid)
	{
		///die("SELECT class_name from article_class where `class_id`='{$cid}' ");
        return $_ENV['db']->fetchCol("SELECT class_name from article_class where `class_id`='{$cid}' ");
	}
	
	public static function GetCompanyContent()
	{
       $row = $_ENV['db']->fetchCol("SELECT description FROM `article` WHERE `article_id` = '4' ");
		return $row;
	}
	
	public static function GetServiceContent()
	{
       $row = $_ENV['db']->fetchCol("SELECT description FROM `article` WHERE `article_id` = '6' ");
		return $row;
	}
	
	public static function GetCaseContent()
	{
       $row = $_ENV['db']->fetchCol("SELECT description FROM `article` WHERE `article_id` = '8' ");
		return $row;
	}
	
	public static function GetSuccessContent()
	{
       $row = $_ENV['db']->fetchCol("SELECT description FROM `article` WHERE `article_id` = '10' ");
		return $row;
	}
	
	public static function GetHangyeContent()
	{
       $row = $_ENV['db']->fetchCol("SELECT description FROM `article` WHERE `article_id` = '9' ");
		return $row;
	}
	
	public static function GetTypeContent()
	{
       $row = $_ENV['db']->fetchCol("SELECT description FROM `article` WHERE `article_id` = '6' ");
		return $row;
	}
	
	
	public static function GetArticleType($aid)
	{
       $row = $_ENV['db']->fetchCol("SELECT cid FROM `article` WHERE `article_id` = '{$aid}' ");
		return $row;
	}

}
?>